package org.web.ssm.dao;

import org.web.ssm.model.Topic;
import org.web.ssm.model.queryVo.BaseQuery;

import java.util.List;

/**
 * Created by hubin on 2016/6/15.
 */

public interface TopicMapper {

    /**
     * 添加产品
     *
     * @param topic
     * @throws Exception
     */
    void addTopic(Topic topic) throws Exception;

    /**
     * 跟新产品
     *
     * @param topic
     * @throws Exception
     */
    void updateTopic(Topic topic) throws Exception;

    /**
     * 删除产品
     *
     * @param topicId
     * @throws Exception
     */
    void delTopic(int topicId) throws Exception;

    /**
     * 获取产品列表
     *
     * @param query
     * @throws Exception
     */
    List<Topic> getTopicList(BaseQuery<Topic> query) throws Exception;

    /**
     * 获取产品总数
     *
     * @return
     * @throws Exception
     */
    int getCount(BaseQuery<Topic> productQuery) throws Exception;
}
